/*module.exports = {
    outputDir: "dist",
    assetsDir: "assets",
    lintOnSave: false,
    devServer: {
      open: false,   关闭自动打开浏览器
      host: "localhost",
      port: "8089",
      https: false,
      hotOnly: false,
      proxy: {
        "/api": {
          target: "http://localhost:8089", 
          ws: true,
          changeOrigin: true,
          pathRewrite: {
            "^/api": "",
          },
        },
      },
    },
  };
  */
  module.exports = {
    outputDir: 'dist',
    assetsDir: 'assets',
    lintOnSave: process.env.NODE_ENV === 'development', // 开发时为true,
    devServer: {
      open: false,
      host: 'localhost',
      port: '8081',
      https: false,
      hotOnly: false,
      //before: require('./mock/mock-server.js'), // 拦截使用mock模拟数据
      proxy: {
        [process.env.VUE_APP_BASE_API + '/api']: {
          target: 'http://localhost:8080',
          ws: true,
          changeOrigin: true,
          pathRewrite: {
            ['^' + process.env.VUE_APP_BASE_API + '/api']: ''
          }
        }
      }
    }
  }